/*
 * For： 测试类型的长度是否正确
 * Author: hongzx zhixionghong@unioncast.net
 * Date: 2008.8.26
 */


#include <iostream>
#include "common/datatype.h"

using namespace std;

#ifdef HAS_SS_NAMESPACE
using namespace ss;
#endif 

void test()
{
	if( sizeof(int8) != 1 )
	{
		cout << "!!!!!!error:sizeof(int8 ) "  << sizeof(int8) << endl;
	}
	if( sizeof(uint8) != 1)
	{

		cout << "!!!!!!error:sizeof(uint8 ) "  << sizeof(uint8) << endl;
	}
	if( sizeof(int16) != 2)
	{
		cout << "!!!!!!error:sizeof(int16) "  << sizeof(int16) << endl;
	}
	if( sizeof(uint16) != 2)
	{

		cout << "!!!!!!error:sizeof(uint16) "  << sizeof(uint16) << endl;
	}
	if( sizeof(int32) != 4)
	{
		cout << "!!!!!!error:sizeof(int32) "  << sizeof(int32) << endl;
	}
	if( sizeof(uint32) != 4)
	{

		cout << "!!!!!!error:sizeof(uint32) "  << sizeof(uint32) << endl;
	}	

	if( sizeof(int64) != 8)
	{
		cout << "!!!!!!error:sizeof(int64) "  << sizeof(int64) << endl;
	}
	if( sizeof(uint64) != 8)
	{
		cout << "!!!!!!error:sizeof(uint64) "  << sizeof(uint64) << endl;
	}
}

int main()
{
	cout << "++++++begin test datatype " << endl;
	test();
	cout << "++++++end test datatype " << endl;
}
